package empty.log;

import java.util.Objects;

public class Log {
    private int id;
    private String caozuo;
    private int user;
    private String cz_time;

    public Log(){}

    public Log(String caozuo, int user) {
        this.caozuo = caozuo;
        this.user = user;
    }

    public Log(int id, String caozuo, int user, String cz_time) {
        this.id = id;
        this.caozuo = caozuo;
        this.user = user;
        this.cz_time = cz_time;
    }

    public Log(String caozuo, int user, String cz_time) {
        this.caozuo = caozuo;
        this.user = user;
        this.cz_time = cz_time;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCaozuo() {
        return caozuo;
    }

    public void setCaozuo(String caozuo) {
        this.caozuo = caozuo;
    }

    public int getUser() {
        return user;
    }

    public void setUser(int user) {
        this.user = user;
    }

    public String getCz_time() {
        return cz_time;
    }

    public void setCz_time(String cz_time) {
        this.cz_time = cz_time;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Log log = (Log) o;
        return id == log.id && user == log.user && Objects.equals(caozuo, log.caozuo) && Objects.equals(cz_time, log.cz_time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, caozuo, user, cz_time);
    }

    @Override
    public String toString() {
        return "Log{" +
                "id=" + id +
                ", caozuo='" + caozuo + '\'' +
                ", user=" + user +
                ", cz_time='" + cz_time + '\'' +
                '}';
    }
}
